<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@include file="/common/common.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题文档</title>
<link href="/BLACK/themes/default/main.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="../style/drp.css">
		<script src="../script/client_validate.js"></script>
		<script charset="utf-8" src="/editor/kindeditor.js"></script>
		<script charset="utf-8" src="/editor/lang/zh_CN.js"></script>
		<script>
		/* var options = {
		        cssPath : '/css/index.css',
		        filterMode : true
		};
		var editor = K.create('textarea[name="content"]', options); */

        var editor;
		KindEditor.ready(function(K) {
				editor = K.create('#editor_brief', {
				//cssPath : '../plugins/code/prettify.css',
				uploadJson : 'editor/jsp/upload_json.jsp',
				fileManagerJson : 'editor/jsp/file_manager_json.jsp',
				items:[
				        'source', '|', 'undo', 'redo', '|', 'preview', 'print', 'template', 'code', 'cut', 'copy', 'paste',
				        'plainpaste', 'wordpaste', '|', 'justifyleft', 'justifycenter', 'justifyright',
				        'justifyfull', 'insertorderedlist', 'insertunorderedlist', 'indent', 'outdent', 'subscript',
				        'superscript', 'clearhtml', 'quickformat', 'selectall', '|', 'fullscreen', '/',
				        'formatblock', 'fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold',
				        'italic', 'underline', 'strikethrough', 'lineheight', 'removeformat', '|', 'image', 'multiimage',
				        'flash', 'media', 'insertfile', 'table', 'hr', 'emoticons', 'baidumap', 'pagebreak',
				        'anchor', 'link', 'unlink', '|', 'about'
						]

				//allowFileManager : true,
				/* afterCreate : function() {
					var self = this;
					K.ctrl(document, 13, function() {
						self.sync();
						document.forms['example'].submit();
					});
					K.ctrl(self.edit.doc, 13, function() {
						self.sync();
						document.forms['example'].submit();
					});
				} */
			});
			//prettyPrint();
			
			editorA = K.create('#editor_content', {
				//cssPath : '../plugins/code/prettify.css',
				uploadJson : 'editor/jsp/upload_json.jsp',
				fileManagerJson : 'editor/jsp/file_manager_json.jsp'
				//allowFileManager : true,
				/* afterCreate : function() {
					var self = this;
					K.ctrl(document, 13, function() {
						self.sync();
						document.forms['example'].submit();
					});
					K.ctrl(self.edit.doc, 13, function() {
						self.sync();
						document.forms['example'].submit();
					});
				} */
			});
			prettyPrint();
		});
       /*  KindEditor.ready(function(K) {
            K.create('#editor_id', {
            	uploadJson : basePath + 'jsp/upload_json.jsp',
            	fileManagerJson : basePath + 'jsp/file_manager_json.jsp'
            });
    	}); */
        
     // 取得HTML内容
        html = editor.html();

        // 同步数据后可以直接取得textarea的value
        editor.sync();
        html = document.getElementById('editor_brief').value; // 原生API
        html = K('#editor_brief').val(); // KindEditor Node API
        html = $('#editor_brief').val(); // jQuery

        // 设置HTML内容
        editor.html('${news.brief}');
        
     // 取得HTML内容
        htmlA = editorA.html();

        // 同步数据后可以直接取得textarea的value
        editorA.sync();
        htmlA = document.getElementById('editor_content').value; // 原生API
        htmlA = K('#editor_content').val(); // KindEditor Node API
        htmlA = $('#editor_content').val(); // jQuery

        // 设置HTML内容
        editorA.html('${news.content}');

		</script>
<script>
function Dis()
{parent.document.getElementById("Fbody").cols="174,12,*"

}
</script>
<style type="text/css">
body {
	color: #000;
	font-family: "宋体", arial;
	font-size: 12px;
	background: #fff;
	text-align: center;
	margin: 0;
}
.nTab {
	float: left;
	width: 960px;
	margin: 0 auto;
	border-bottom:1px #AACCEE solid;
	background:#d5d5d5;
	background-position:left;
	background-repeat:repeat-y;
	margin-bottom:2px;
}
.nTab .TabTitle {
	clear: both;
	height: 22px;
	overflow: hidden;
}
.nTab .TabTitle ul {
	border:0;
	margin:0;
	padding:0;
}
.nTab .TabTitle li {
	float: left;
	width: 70px;
	cursor: pointer;
	padding-top: 4px;
	padding-right: 0px;
	padding-left: 0px;
	padding-bottom: 2px;
	list-style-type: none;
}
.nTab .TabTitle .active {
	background:#fff;
	border-left:1px #AACCEE solid;
	border-top:1px #AACCEE solid;
	border-right:1px #AACCEE solid;
	border-bottom:1px #fff solid;
}
.nTab .TabTitle .normal {
	background:#EBF3FB;
	border:1px #AACCEE solid;
}
.nTab .TabContent {
	width:auto;
	background:#fff;
	margin: 0px auto;
	padding:10px 0 0 0;
	border-right:1px #AACCEE solid;
	border-left:1px #AACCEE solid;
}
.none { display:block; }
</style>
<script type="text/javascript">
function nTabs(thisObj,Num){
if(thisObj.className == "active")return;
var tabObj = thisObj.parentNode.id;
var tabList = document.getElementById(tabObj).getElementsByTagName("li");
for(i=0; i <tabList.length; i++)
{
  if (i == Num)
  {
   thisObj.className = "active"; 
      document.getElementById(tabObj+"_Content"+i).style.display = "block";
  }else{
   tabList[i].className = "normal"; 
   document.getElementById(tabObj+"_Content"+i).style.display = "none";
  }
} 
}

function aa(){
	var valSel = ${typeId}+"op";
	//var pages = parseInt
	//document.getElementById("total").innerHTML = "&nbsp;共&nbsp"+Math.ceil(${pm.total}/15)+"&nbsp页";
	document.getElementById(valSel).selected="selected";
	
}
</script>
</head>
<body onload="aa()">
<div class="topnav">现在的位置：信息管理&gt;栏目管理</div>

	<!-- 内容开始 -->
	<div class="TabContent">
		<div id="myTab1_Content0">
		<form name="userForm" action="/news!add.action"  id="userForm">
			<table width="100%" border="0" cellpadding="0" cellspacing="0" class="formTable">
				
				<tr>
					<td class="itemname">&nbsp;</td>
					<td>&nbsp;</td>
					<td class="itemname">&nbsp;</td>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td width="10%" class="itemname">新闻标题</td>
					<td width="30%"><label></label>
					<input type="text" name="news.title" id="textfield"  value="${news.title }"/></td>
					<td width="17%" class="itemname">所属类型</td>
					<td width="33%"><select name="news.type.id"  class="text1"  id="sel">
								<c:forEach items="${list}" var = "type">
								 <option id="${type.id}op" value ="${type.id}">${type.name }</option>
								 </c:forEach>
							</select></td>
				</tr>
				<tr>
					<td class="itemname">新闻</td>
					<td>:</td>
					<td class="itemname">&nbsp;
					<input type="hidden" name="typeId" value="${typeId}"/>
					<input type="hidden" name="news.id" value="${news.id}"/>
					</td>
					<td>&nbsp;</td>
				</tr>
				<tr>
					
					
					<td width="90%" class="itemname" colspan="4" align="center">
					<textarea id="editor_brief" name="news.content" style="width:100%;height:300px;">&lt;strong&gt;${news.content}&lt;/strong&gt;</textarea>
					</td>
					
				</tr>
				
				
				
				<tr>
					<td class="itemname">&nbsp;</td>
					<td>&nbsp;</td>
					<td class="itemname">&nbsp;</td>
					<td>&nbsp;</td>
				</tr>
				<tr>
					<td class="itemname">&nbsp;</td>
					<td colspan="3"><input name="button3" type="submit" class="btn" id="button3" value="保存"  />
						&nbsp;&nbsp;
					<input name="button" type="submit" class="btn" id="button" value="返回列表" onclick="window.location='/news.action?size=15&typeId=0'" /></td>
				</tr>
			</table>
			</form>
		</div>
		
		
	</div>
</div>
<!-- 选项卡1结束 -->
<script type="text/javascript">
	

	
</script>
</body>
</html>
